<style scoped></style>

<template>
    <h1>{{ msg }}</h1>
    <a v-bind:href="href">点击跳转百度</a>
    <img :src="imgSrc" alt="" :attr="msg">
    <hr>
    <button v-on:click="_click()">CLICK</button>
    <button @click="_click()">CLICK</button>
</template>

<script lang="ts" setup>

import { ref } from 'vue';

const msg = ref("demo1");
const href = ref("http://www.baidu.com");
const imgSrc = "https://t9.baidu.com/it/u=4119950838,3897051738&fm=217&app=126&size=f242,150&n=0&f=PNG?s=4B6CB342C543A3E78651CA0A030060D7&sec=1740848400&t=63bfe8b4704a13660c94de58b8c74813";

const _click = ()=>{
    console.log('click');
}

</script>